<%-- 
    Document   : db3
    Created on : 2014/8/19, 下午 02:19:21
    Author     : Benny
--%>

<%@page import="java.sql.Statement"%>
<%@page import="java.sql.DriverManager"%>
<%@page import="java.sql.Connection"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%
    Class.forName("com.mysql.jdbc.Driver");
    Connection con=DriverManager.getConnection("jdbc:mysql://localhost:3306/javadb?zeroDateTimeBehavior=convertToNull","root","root");
    Statement st=con.createStatement();
    String sql ="delete from person where id=9";
    int x=st.executeUpdate(sql);
    con.close();
    st.close();
%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>DB3</title>
    </head>
    <body>
        <h1>-----DB3-----</h1>
        <hr>
        刪除<%= x %>筆資料
    </body>
</html>
